package me.zhengjie.server.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import me.zhengjie.dao.FloorMinMaxDao;
import me.zhengjie.mapper.FloorMinMaxMapper;
import me.zhengjie.server.FloorMinMaxService;
import me.zhengjie.vo.FloorMinMaxVo;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
* @author xinglin.lu
* @description 针对表【iws_floor_min_max(楼层最大最小起订量)】的数据库操作Service实现
* @createDate 2025-06-11 11:42:21
*/
@Service
public class FloorMinMaxServiceImpl extends ServiceImpl<FloorMinMaxMapper, FloorMinMaxDao>
    implements FloorMinMaxService{

    @Override
    public FloorMinMaxVo selectList() {
        List<FloorMinMaxDao> resultList = new ArrayList<>();
        List<FloorMinMaxDao> result =  baseMapper.selectList(null);
        result.stream().forEach(e->e.getFloorId().replaceAll("\\r\\n",""));
        for (FloorMinMaxDao floorMinMaxDao : result) {
            String s = floorMinMaxDao.getFloorId().replaceAll("\\r\\n", "");
            floorMinMaxDao.setFloorId(s);
            resultList.add(floorMinMaxDao);
        }
        if (result != null) {
            return  new FloorMinMaxVo(resultList);
        }
       return new FloorMinMaxVo();
    }
}




